home *** CD-ROM | disk | FTP | other *** search
/ Developer CD Series 1997 July: Mac OS SDK / Dev.CD Jul 97 SDK1.toast / Development Kits (Disc 1) / Macintosh Easy Open / Documentation / Developer / Interfaces / CIncludes / Translation.h < prev    next >
Encoding:
C/C++ Source or Header  |  1994-12-12  |  3.6 KB  |  114 lines  |  [TEXT/MPS ]

  1. /*
  2.      File:        Translation.h
  3.  
  4.      Copyright:    © 1984-1994 by Apple Computer, Inc.
  5.                  All rights reserved.
  6.  
  7.      Version:    Built by:            anonymous
  8.                  From:                Translation.i, revision 9, dated 6/21/94
  9.                  With Interfacer:    1.1d4e2
  10.  
  11.      Bugs:        Report bugs to Radar component “System Interfaces”, “Latest”
  12.                  List the version information from above in Problem Description.
  13.  
  14. */
  15.  
  16. #ifndef __TRANSLATION__
  17. #define __TRANSLATION__
  18.  
  19.  
  20. #ifdef __cplusplus
  21. extern "C" {
  22. #endif
  23.  
  24. #ifndef REZ
  25.  
  26. #ifndef __TYPES__
  27. #include <Types.h>
  28. #endif
  29. /*    #include <ConditionalMacros.h>                                */
  30. /*    #include <MixedMode.h>                                        */
  31. /*        #include <Traps.h>                                        */
  32.  
  33. #ifndef __FILES__
  34. #include <Files.h>
  35. #endif
  36. /*    #include <OSUtils.h>                                        */
  37. /*    #include <SegLoad.h>                                        */
  38.  
  39. #ifndef __COMPONENTS__
  40. #include <Components.h>
  41. #endif
  42.  
  43. #ifndef __TRANSLATIONEXTENSIONS__
  44. #include <TranslationExtensions.h>
  45. #endif
  46. /*    #include <Memory.h>                                            */
  47. /*    #include <Quickdraw.h>                                        */
  48. /*        #include <QuickdrawText.h>                                */
  49. /*            #include <IntlResources.h>                            */
  50. /*    #include "Components.h"                                        */
  51. #define gestaltTranslationPPCAvail 2
  52.  
  53. #define gestaltTranslationGetPathAPIAvail 3
  54.  
  55. typedef short DocOpenMethod;
  56.  
  57.  
  58. enum {
  59.     domCannot,
  60.     domNative,
  61.     domTranslateFirst,
  62.     domWildcard
  63. };
  64.  
  65. typedef OSType TypesBlock[64];
  66.  
  67. typedef OSType *TypesBlockPtr;
  68.  
  69. #define TranslationScrapProgressDialogID -16555
  70.  
  71. #if defined(powerc) || defined (__powerc)
  72. #pragma options align=mac68k
  73. #endif
  74. struct FileTranslationSpec {
  75.     OSType                            componentSignature;
  76.     const void                        *translationSystemInfo;
  77.     FileTypeSpec                    src;
  78.     FileTypeSpec                    dst;
  79. };
  80. #if defined(powerc) || defined(__powerc)
  81. #pragma options align=reset
  82. #endif
  83.  
  84. typedef struct FileTranslationSpec FileTranslationSpec;
  85.  
  86. typedef FileTranslationSpec *FileTranslationSpecArrayPtr;
  87.  
  88. extern pascal OSErr GetFileTypesThatAppCanNativelyOpen(short appVRefNumHint, OSType appSignature, FileType *nativeTypes)
  89.  TWOWORDINLINE(0x701C, 0xABFC);
  90. extern pascal OSErr ExtendFileTypeList(const FileType *originalTypeList, short numberOriginalTypes, FileType *extendedTypeList, short *numberExtendedTypes)
  91.  TWOWORDINLINE(0x7009, 0xABFC);
  92. extern pascal OSErr CanDocBeOpened(const FSSpec *targetDocument, short appVRefNumHint, OSType appSignature, const FileType *nativeTypes, Boolean onlyNative, DocOpenMethod *howToOpen, FileTranslationSpec *howToTranslate)
  93.  TWOWORDINLINE(0x701E, 0xABFC);
  94. extern pascal short GetFileTranslationPaths(FSSpec *srcDocument, FileType dstDocType, unsigned short maxResultCount, FileTranslationSpecArrayPtr resultBuffer)
  95.  TWOWORDINLINE(0x7038, 0xABFC);
  96. extern pascal OSErr GetPathFromTranslationDialog(const FSSpec *theDocument, const FSSpec *theApplication, const TypesBlockPtr typeList, DocOpenMethod *howToOpen, FileTranslationSpec *howToTranslate)
  97.  TWOWORDINLINE(0x7037, 0xABFC);
  98. extern pascal OSErr TranslateFile(const FSSpec *sourceDocument, const FSSpec *destinationDocument, const FileTranslationSpec *howToTranslate)
  99.  TWOWORDINLINE(0x700C, 0xABFC);
  100. extern pascal OSErr GetDocumentKindString(short docVRefNum, OSType docType, OSType docCreator, Str63 kindString)
  101.  TWOWORDINLINE(0x7016, 0xABFC);
  102. extern pascal OSErr GetTranslationExtensionName(const FileTranslationSpec *translationMethod, Str31 extensionName)
  103.  TWOWORDINLINE(0x7036, 0xABFC);
  104. typedef pascal OSErr (*GetScrapDataProcPtr)(ScrapType requestedFormat, Handle dataH, void *srcDataGetterRefCon);
  105. extern pascal OSErr TranslateScrap(GetScrapDataProcPtr sourceDataGetter, void *sourceDataGetterRefCon, ScrapType destinationFormat, Handle destinationData, short progressDialogID)
  106.  TWOWORDINLINE(0x700E, 0xABFC);
  107. #endif
  108.  
  109. #ifdef __cplusplus
  110. }
  111. #endif
  112.  
  113. #endif /* __TRANSLATION__ */
  114.